package com.tommy.ddp.disposeHandler
{
	import com.tommy.ddp.GridDataManager;
	import com.tommy.ddp.box.DdpBox;
	import com.tommy.ddp.definition.DDPConfig;
	import com.tommy.ddp.manager.DisposeBoxManager;
	
	public class AllYAxisDisposeHandler implements IDisposeHandler
	{
		public function AllYAxisDisposeHandler()
		{
		}
		
		public function dispose(box:DdpBox):Vector.<DdpBox>
		{
			trace("=================> dispose all Y");
			//揪放特效
			box.dispose();
			GridDataManager.removeBox(box);
			
			var vect:Vector.<DdpBox> = new Vector.<DdpBox>();
			for(var i:uint = 0;i<DDPConfig.H_NUM;i++)
			{
				var b:DdpBox = GridDataManager.getBox(box.column,i);
				if(b && !b.isInDisposeList)
					//DisposeBoxManager.addDisposeBox(b);
					vect.push(b);
			}
			
			//|||缺格子处理
			
			return vect;
		}
	}
}